package com.ruoyi.workflow.service.impl;

import com.ruoyi.workflow.service.IFlowableCallbackService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * 工作流回调eoms业务系统实现类
 */

@Service("eoms-callback")
public class EomsCallbackServiceImpl implements IFlowableCallbackService {


    @Override
    public Map<String, Object> callbackBusinessApp(Map<String,Object> callback) {

        //{
        //    "_FLOWABLE_SKIP_EXPRESSION_ENABLED": false,
        //        "processCode": "DocumentChangeProcess",
        //        "initiator": "13",
        //        "businessKey": "10080",
        //        "userMap": {
        //    "applyUserId": "13",
        //            "applyUserPost": "",
        //            "applyUserName": "张三"
        //},
        //    "auditType": "DocumentChange",
        //        "businessMap": {
        //    "lastUpdatedStamp": 1618017110000,
        //            "createdTxStamp": 1618017110000,
        //            "createdStamp": 1618017110000,
        //            "contentId": "10080",
        //            "contentTypeId": "10001",
        //            "description": "国务院新闻办公室于2021年3月29日（星期一）上午10时举行新闻发布会，请国家税务总局副局长任荣发、总经济师王道树、总审计师饶立新、纳税服务司司长韩国荣介绍《关于进一步深化税收征管改革的意见》有关情况，并答记者问。",
        //            "lastUpdatedTxStamp": 1618017110000,
        //            "params": {},
        //    "version": "1.0",
        //            "contentName": "关于进一步深化税收征管改革的意见",
        //            "createdDate": 1618017110000,
        //            "statusId": "CTNT_INITIAL_DRAFT",
        //            "createdByUserLogin": "1"
        //},
        //    "serviceName": "eoms-callback",
        //        "taskStatus": "agree"
        //}

        Map hashMap = new HashMap();
        hashMap.put("msg", "这是合同模块的工作流回调！");
        hashMap.put("data", callback.get("data"));
        return hashMap;
    }
}
